package com.jmp.feign;

import one.stand.entity.excel.BusinessExcelEntity;
import one.stand.fallback.AdminFallBack;
import one.stand.model.CompanyApplyRecordModel;
import one.stand.model.CompanyCategoryModel;
import one.stand.model.CompanyCategoryRelationModel;
import one.stand.model.ResultModel;
import one.stand.request.*;
import one.stand.response.NoticeResponse;
import one.stand.response.VersionResponse;
import one.stand.util.ExportDataDTO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;
import java.util.Map;

/**
 * @author Administrator
 */
@FeignClient(value = "admin-service", fallback = AdminFallBack.class, decode404 = true)
public interface AdminFegin {

    /**
     * 设置企业代理权限和代理价格
     *
     * @param request
     * @return
     */
    @PostMapping("company/configureAgen")
    ResultModel<Boolean> configureAgen(@RequestBody CompanyRequest request);

    /**
     * 新增总后台管理员
     *
     * @param request
     * @return
     */
    @PostMapping("company/appletCodeManageList")
    ResultModel<Map<String, Object>> appletCodeManageList(@RequestBody VersionRequest request);

    /**
     * 新增总后台管理员
     *
     * @param request
     * @return
     */
    @PostMapping("company/appletCodeManageInfo")
    ResultModel<VersionResponse> appletCodeManageInfo(@RequestBody VersionRequest request);

    /**
     * 添加版本号
     *
     * @param request
     * @return
     */
    @PostMapping("company/addVersionInfo")
    ResultModel<Boolean> addVersionInfo(@RequestBody VersionRequest request);

    /**
     * 审核公司
     *
     * @param request
     * @return
     */
    @PostMapping("company/auditCompany")
    ResultModel auditCompany(@RequestBody CompanyRequest request);

    /**
     * 查询用户列表
     *
     * @param request
     * @return
     */
    @PostMapping("businessCard/selectCustomerList")
    ResultModel<Map<String, Object>> selectCustomerList(@RequestBody BusinessCardRequest request);

    /**
     * 导出用户列表
     *
     * @param request
     * @return
     */
    @PostMapping("businessCard/selectCustomerListExport")
    ResultModel<ExportDataDTO<BusinessExcelEntity>> selectCustomerListExport(@RequestBody BusinessCardRequest request);

    /**
     * 禁用用户
     *
     * @return
     */
    @PostMapping("company/selectAppId")
    ResultModel<List<String>> selectAppId(@RequestParam("versionId") Integer versionId);

    /**
     * 查询企业公告列表
     *
     * @param request
     * @return
     */
    @PostMapping("notice/selectNoticeList")
    ResultModel<Map<String, Object>> selectNoticeList(@RequestBody NoticeRequest request);

    /**
     * 查询企业公告信息
     *
     * @param request
     * @return
     */
    @PostMapping("notice/getNoticeInfo")
    ResultModel<NoticeResponse> getNoticeInfo(@RequestBody NoticeRequest request);

    /**
     * 新增/修改企业公告
     *
     * @param request
     * @return
     */
    @PostMapping("notice/insertNotice")
    ResultModel<Boolean> insertNotice(@RequestBody NoticeRequest request);

    /**
     * 删除企业公告
     *
     * @param request
     * @return
     */
    @PostMapping("notice/delNotice")
    ResultModel<Boolean> delNotice(@RequestBody NoticeRequest request);

    @PostMapping("company/category/list")
    ResultModel companyCategoryList(@RequestBody CompanyCategoryModelRequest request);

    @PostMapping("company/category/add")
    ResultModel companyCategoryAdd(@RequestBody CompanyCategoryModel model);

    @PostMapping("company/category/delete")
    ResultModel companyCategoryDelete(@RequestBody CompanyCategoryModel model);

    @PostMapping("company/apply/list")
    ResultModel applyList(CompanyApplyRecordModel request);

    @PostMapping("company/apply/updateState")
    ResultModel updateState(CompanyApplyRecordModel request);

    @PostMapping("company/apply/category/del")
    ResultModel categoryDel(CompanyCategoryRelationModel request);

    @PostMapping("company/apply/category/add")
    ResultModel categoryAdd(CompanyCategoryRelationModel request);

    @PostMapping("company/apply/category/list")
    ResultModel categoryList(CompanyCategoryRelationModel request);
}
